﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.ComponentModel;

namespace WpfAsteriskCTI
{
    class DataClasses
    {
        public class NewCall : INotifyPropertyChanged
        {
            public string sAccountCode = null;
            public string AccountCode
            {
                get { return sAccountCode; }
                set
                {
                    sAccountCode = value;
                    NotifyPropertyChanged("AccountCode");
                }
            }

            public Dictionary<string, string> sAttributes = new Dictionary<string, string>();
            public Dictionary<string, string> Attributes
            {
                get { return sAttributes; }
                set
                {
                    sAttributes = value;
                    NotifyPropertyChanged("Attributes");
                }
            }

            public string sCallerId;
            public string CallerId
            {
                get { return sCallerId; }
                set
                {
                    sCallerId = value;
                    NotifyPropertyChanged("CallerId");
                }
            }

            public string sCallerIdName;
            public string CallerIdName
            {
                get { return sCallerIdName; }
                set
                {
                    sCallerIdName = value;
                    NotifyPropertyChanged("CallerIdName");
                }
            }

            public string sCallerIdNum;
            public string CallerIdNum
            {
                get { return sCallerIdNum; }
                set
                {
                    sCallerIdNum = value;
                    NotifyPropertyChanged("CallerIdNum");
                }
            }

            public string sChannel;
            public string Channel
            {
                get { return sChannel; }
                set
                {
                    sChannel = value;
                    NotifyPropertyChanged("Channel");
                }
            }

            public string sCidCallingPres;
            public string CidCallingPres
            {
                get { return sCidCallingPres; }
                set
                {
                    sCidCallingPres = value;
                    NotifyPropertyChanged("CidCallingPres");
                }
            }

            public int sCidCallingPresNumeric;
            public int CidCallingPresNumeric
            {
                get { return sCidCallingPresNumeric; }
                set
                {
                    sCidCallingPresNumeric = value;
                    NotifyPropertyChanged("CidCallingPresNumeric");
                }
            }

            public DateTime sDateReceived;
            public DateTime DateReceived
            {
                get { return sDateReceived; }
                set
                {
                    sDateReceived = value;
                    NotifyPropertyChanged("DateReceived");
                }
            }

            public string sPrivilege;
            public string Privilege
            {
                get { return sPrivilege; }
                set
                {
                    sPrivilege = value;
                    NotifyPropertyChanged("Privilege");
                }
            }

            public string sServer;
            public string Server
            {
                get { return sServer; }
                set
                {
                    sServer = value;
                    NotifyPropertyChanged("Server");
                }
            }

            public AsterNET.Manager.ManagerConnection sSource;
            public AsterNET.Manager.ManagerConnection Source
            {
                get { return sSource; }
                set
                {
                    sSource = value;
                    NotifyPropertyChanged("Source");
                }
            }

            public double sTimeStamp;
            public double TimeStamp
            {
                get { return sTimeStamp; }
                set
                {
                    sTimeStamp = value;
                    NotifyPropertyChanged("TimeStamp");
                }
            }

            public string sUniqueId;
            public string UniqueId
            {
                get { return sUniqueId; }
                set
                {
                    sUniqueId = value;
                    NotifyPropertyChanged("UniqueId");
                }
            }

            public event PropertyChangedEventHandler PropertyChanged;

            public void NotifyPropertyChanged(string propertyName)
            {
                if (PropertyChanged != null)
                {
                    PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
                }
            }


            public NewCall(String sAccountCode, Dictionary<string, string> sAttributes, String sCallerId, String sCallerIdName, String sCallerIdNum,
                String sChannel, String sCidCallingPres, int sCidCallingPresNumeric, DateTime sDateReceived, String sPrivilege, String sServer,
                AsterNET.Manager.ManagerConnection sSource, double sTimeStamp, String sUniqueId)
            {
                this.AccountCode = sAccountCode;
                this.Attributes = sAttributes;
                this.CallerId = sCallerId;
                this.CallerIdName = sCallerIdName;
                this.CallerIdNum = sCallerIdNum;
                this.Channel = sChannel;
                this.CidCallingPres = CidCallingPres;
                this.CidCallingPresNumeric = sCidCallingPresNumeric;
                this.DateReceived = sDateReceived;
                this.Privilege = sPrivilege;
                this.Server = sServer;
                this.Source = sSource;
                this.TimeStamp = sTimeStamp;
                this.UniqueId = sUniqueId;

            }

            public NewCall()
            {

            }

            public static List<NewCall> GetNewCallList()
            {
                return new List<NewCall>();
            }


        }

//*************************************************************************************

        public class NewState : INotifyPropertyChanged
        {
            public string sAccountCode = null;
            public string AccountCode
            {
                get { return sAccountCode; }
                set
                {
                    sAccountCode = value;
                    NotifyPropertyChanged("AccountCode");
                }
            }

            public Dictionary<string,string> sAttributes = null;
            public Dictionary<string, string> Attributes
            {
                get { return sAttributes; }
                set
                {
                    sAttributes = value;
                    NotifyPropertyChanged("Attributes");
                }
            }

            public string sPartyCallerIdNum = null;
            public string PartyCallerIdNum
            {
                get { return sPartyCallerIdNum; }
                set
                {
                    sPartyCallerIdNum = value;
                    NotifyPropertyChanged("PartyCallerIdNum");
                }
            }

            public string sPartyCallerIdName = null;
            public string PartyCallerIdName
            {
                get { return sPartyCallerIdName; }
                set
                {
                    sPartyCallerIdName = value;
                    NotifyPropertyChanged("PartyCallerIdName");
                }
            }

            public string sCallerId = null;
            public string CallerId
            {
                get { return sCallerId; }
                set
                {
                    sCallerId = value;
                    NotifyPropertyChanged("CallerId");
                }
            }

            public string sCallerIdName = null;
            public string CallerIdName
            {
                get { return sCallerIdName; }
                set
                {
                    sCallerIdName = value;
                    NotifyPropertyChanged("CallerIdName");
                }
            }

            public string sCallerIdNum = null;
            public string CallerIdNum
            {
                get { return sCallerIdNum; }
                set
                {
                    sCallerIdNum = value;
                    NotifyPropertyChanged("CallerIdNum");
                }
            }

            public string sChannel = null;
            public string Channel
            {
                get { return sChannel; }
                set
                {
                    sChannel = value;
                    NotifyPropertyChanged("Channel");
                }
            }

            public string sBridgedchannel = null;
            public string Bridgedchannel
            {
                get { return sBridgedchannel; }
                set
                {
                    sBridgedchannel = value;
                    NotifyPropertyChanged("Bridgedchannel");
                }
            }

            public string sChannelState = null;
            public string ChannelState
            {
                get { return sChannelState; }
                set
                {
                    sChannelState = value;
                    NotifyPropertyChanged("ChannelState");
                }
            }

            public string sChannelStateDesc = null;
            public string ChannelStateDesc
            {
                get { return sChannelStateDesc; }
                set
                {
                    sChannelStateDesc = value;
                    NotifyPropertyChanged("ChannelStateDesc");
                }
            }

            public DateTime sDateReceived;
            public DateTime DateReceived
            {
                get { return sDateReceived; }
                set
                {
                    sDateReceived = value;
                    NotifyPropertyChanged("DateReceived");
                }
            }

            public string sPrivilege = null;
            public string Privilege
            {
                get { return sPrivilege; }
                set
                {
                    sPrivilege = value;
                    NotifyPropertyChanged("Privilege");
                }
            }

            public string sServer = null;
            public string Server
            {
                get { return sServer; }
                set
                {
                    sServer = value;
                    NotifyPropertyChanged("Server");
                }
            }

            public AsterNET.Manager.ManagerConnection sSource = null;
            public AsterNET.Manager.ManagerConnection Source
            {
                get { return sSource; }
                set
                {
                    sSource = value;
                    NotifyPropertyChanged("Source");
                }
            }

            public string sState = null;
            public string State
            {
                get { return sState; }
                set
                {
                    sState = value;
                    NotifyPropertyChanged("State");
                }
            }

            public double sTimeStamp;
            public double TimeStamp
            {
                get { return sTimeStamp; }
                set
                {
                    sTimeStamp = value;
                    NotifyPropertyChanged("TimeStamp");
                }
            }

            public string sUniqueId = null;
            public string UniqueId
            {
                get { return sUniqueId; }
                set
                {
                    sUniqueId = value;
                    NotifyPropertyChanged("UniqueId");
                }
            }

            public string sBridgedUniqueId = null;
            public string BridgedUniqueId
            {
                get { return sBridgedUniqueId; }
                set
                {
                    sBridgedUniqueId = value;
                    NotifyPropertyChanged("BridgedUniqueId");
                }
            }
            public event PropertyChangedEventHandler PropertyChanged;

            public void NotifyPropertyChanged(string propertyName)
            {
                if (PropertyChanged != null)
                {
                    PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
                }
            }
        }

//*************************************************************************************

        public class NewChannel : INotifyPropertyChanged
        {
            public string sAccountCode = null;
            public string AccountCode
            {
                get { return sAccountCode; }
                set
                {
                    sAccountCode = value;
                    NotifyPropertyChanged("AccountCode");
                }
            }

            public string sCallerId = null;
            public string CallerId
            {
                get { return sCallerId; }
                set
                {
                    sCallerId = value;
                    NotifyPropertyChanged("CallerId");
                }
            }

            public string sCallerIdName = null;
            public string CallerIdName
            {
                get { return sCallerIdName; }
                set
                {
                    sCallerIdName = value;
                    NotifyPropertyChanged("CallerIdName");
                }
            }

            public string sCallerIdNum = null;
            public string CallerIdNum
            {
                get { return sCallerIdNum; }
                set
                {
                    sCallerIdNum = value;
                    NotifyPropertyChanged("CallerIdNum");
                }
            }

            public string sChannel = null;
            public string Channel
            {
                get { return sChannel; }
                set
                {
                    sChannel = value;
                    NotifyPropertyChanged("Channel");
                }
            }

            public string sChannelState = null;
            public string ChannelState
            {
                get { return sChannelState; }
                set
                {
                    sChannelState = value;
                    NotifyPropertyChanged("ChannelState");
                }
            }

            public string sChannelStateDesc = null;
            public string ChannelStateDesc
            {
                get { return sChannelStateDesc; }
                set
                {
                    sChannelStateDesc = value;
                    NotifyPropertyChanged("ChannelStateDesc");
                }
            }

            public string sPartyCallerIdName = null;
            public string PartyCallerIdName
            {
                get { return sPartyCallerIdName; }
                set
                {
                    sPartyCallerIdName = value;
                    NotifyPropertyChanged("PartyCallerIdName");
                }
            }

            public string sPartyCallerIdNum = null;
            public string PartyCallerIdNum
            {
                get { return sPartyCallerIdNum; }
                set
                {
                    sPartyCallerIdNum = value;
                    NotifyPropertyChanged("PartyCallerIdNum");
                }
            }
            
            public string sState = null;
            public string State
            {
                get { return sState; }
                set
                {
                    sState = value;
                    NotifyPropertyChanged("State");
                }
            }

            public String sUniqueId;
            public String UniqueId
            {
                get { return sUniqueId; }
                set
                {
                    sUniqueId = value;
                    NotifyPropertyChanged("UniqueId");
                }
            }

            public event PropertyChangedEventHandler PropertyChanged;

            public void NotifyPropertyChanged(string propertyName)
            {
                if (PropertyChanged != null)
                {
                    PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
                }
            }
        }

//*************************************************************************************

        public class Hangup : INotifyPropertyChanged
        {
            public string sAccountCode = null;
            public string AccountCode
            {
                get { return sAccountCode; }
                set
                {
                    sAccountCode = value;
                    NotifyPropertyChanged("AccountCode");
                }
            }

            public Dictionary<string, string> sAttributes = null;
            public Dictionary<string, string> Attributes
            {
                get { return sAttributes; }
                set
                {
                    sAttributes = value;
                    NotifyPropertyChanged("Attributes");
                }
            }

            public string sCallerId = null;
            public string CallerId
            {
                get { return sCallerId; }
                set
                {
                    sCallerId = value;
                    NotifyPropertyChanged("CallerId");
                }
            }

            public string sCallerIdName = null;
            public string CallerIdName
            {
                get { return sCallerIdName; }
                set
                {
                    sCallerIdName = value;
                    NotifyPropertyChanged("CallerIdName");
                }
            }

            public string sCaller = null;
            public string Caller
            {
                get { return sCaller; }
                set
                {
                    sCaller = value;
                    NotifyPropertyChanged("Caller");
                }
            }

            public string sCallerIdNum = null;
            public string CallerIdNum
            {
                get { return sCallerIdNum; }
                set
                {
                    sCallerIdNum = value;
                    NotifyPropertyChanged("CallerIdNum");
                }
            }

            public int sCause;
            public int Cause
            {
                get { return sCause; }
                set
                {
                    sCause = value;
                    NotifyPropertyChanged("Cause");
                }
            }

            public string sCauseTxt = null;
            public string CauseTxt
            {
                get { return sCauseTxt; }
                set
                {
                    sCauseTxt = value;
                    NotifyPropertyChanged("CauseTxt");
                }
            }

            public string sChannel = null;
            public string Channel
            {
                get { return sChannel; }
                set
                {
                    sChannel = value;
                    NotifyPropertyChanged("Channel");
                }
            }

            public string sChannelState = null;
            public string ChannelState
            {
                get { return sChannelState; }
                set
                {
                    sChannelState = value;
                    NotifyPropertyChanged("ChannelState");
                }
            }

            public string sChannelStateDesc = null;
            public string ChannelStateDesc
            {
                get { return sChannelStateDesc; }
                set
                {
                    sChannelStateDesc = value;
                    NotifyPropertyChanged("ChannelStateDesc");
                }
            }

            public DateTime sDateReceived;
            public DateTime DateReceived
            {
                get { return sDateReceived; }
                set
                {
                    sDateReceived = value;
                    NotifyPropertyChanged("DateReceived");
                }
            }

            public string sPrivilege = null;
            public string Privilege
            {
                get { return sPrivilege; }
                set
                {
                    sPrivilege = value;
                    NotifyPropertyChanged("Privilege");
                }
            }

            public string sServer = null;
            public string Server
            {
                get { return sServer; }
                set
                {
                    sServer = value;
                    NotifyPropertyChanged("Server");
                }
            }

            public AsterNET.Manager.ManagerConnection sSource = null;
            public AsterNET.Manager.ManagerConnection Source
            {
                get { return sSource; }
                set
                {
                    sSource = value;
                    NotifyPropertyChanged("Source");
                }
            }

            public string sState = null;
            public string State
            {
                get { return sState; }
                set
                {
                    sState = value;
                    NotifyPropertyChanged("State");
                }
            }

            public double sTimeStamp;
            public double TimeStamp
            {
                get { return sTimeStamp; }
                set
                {
                    sTimeStamp = value;
                    NotifyPropertyChanged("TimeStamp");
                }
            }

            public string sUniqueID = null;
            public string UniqueID
            {
                get { return sUniqueID; }
                set
                {
                    sUniqueID = value;
                    NotifyPropertyChanged("UniqueID");
                }
            }

            public event PropertyChangedEventHandler PropertyChanged;

            public void NotifyPropertyChanged(string propertyName)
            {
                if (PropertyChanged != null)
                {
                    PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
                }
            }
        }

//*************************************************************************************

        public class LocalExtension : INotifyPropertyChanged
        {
            public string sExtension = null;
            public string Extension
            {
                get { return sExtension; }
                set
                {
                    sExtension = value;
                    NotifyPropertyChanged("Extension");
                }
            }

            public string sDial = null;
            public string Dial
            {
                get { return sDial; }
                set
                {
                    sDial = value;
                    NotifyPropertyChanged("Dial");
                }
            }

            public string sCallerid = null;
            public string Callerid
            {
                get { return sCallerid; }
                set
                {
                    sCallerid = value;
                    NotifyPropertyChanged("Callerid");
                }
            }

            public string sTech = null;
            public string Tech
            {
                get { return sTech; }
                set
                {
                    sTech = value;
                    NotifyPropertyChanged("Tech");
                }
            }

            public string sDescription = null;
            public string Description
            {
                get { return sDescription; }
                set
                {
                    sDescription = value;
                    NotifyPropertyChanged("Description");
                }
            }

            public string sStatus = null;
            public string Status
            {
                get { return sStatus; }
                set
                {
                    sStatus = value;
                    NotifyPropertyChanged("Status");
                }
            }
            public event PropertyChangedEventHandler PropertyChanged;

            public void NotifyPropertyChanged(string propertyName)
            {
                if (PropertyChanged != null)
                {
                    PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
                }
            }
        }

//*************************************************************************************

        public class RingGroups : INotifyPropertyChanged
        {
            public string sGrpnum = null;
            public string Grpum
            {
                get { return sGrpnum; }
                set
                {
                    sGrpnum = value;
                    NotifyPropertyChanged("Grpnum");
                }
            }

            public string sGrplist = null;
            public string Grplist
            {
                get { return sGrplist; }
                set
                {
                    sGrplist = value;
                    NotifyPropertyChanged("Grplist");
                }
            }

            public string sDescription = null;
            public string Description
            {
                get { return sDescription; }
                set
                {
                    sDescription = value;
                    NotifyPropertyChanged("Description");
                }
            }

            public event PropertyChangedEventHandler PropertyChanged;

            public void NotifyPropertyChanged(string propertyName)
            {
                if (PropertyChanged != null)
                {
                    PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
                }
            }
        }

//*************************************************************************************

        public class Trunks : INotifyPropertyChanged
        {
            public string sDial = null;
            public string Dial
            {
                get { return sDial; }
                set
                {
                    sDial = value;
                    NotifyPropertyChanged("Dial");
                }
            }

            public event PropertyChangedEventHandler PropertyChanged;

            public void NotifyPropertyChanged(string propertyName)
            {
                if (PropertyChanged != null)
                {
                    PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
                }
            }
        }

//*************************************************************************************

        public class History : INotifyPropertyChanged
        {
            public DateTime sCallDate;
            public DateTime CallDate
            {
                get { return sCallDate; }
                set
                {
                    sCallDate = value;
                    NotifyPropertyChanged("CallDate");
                }
            }

            public String sCLid;
            public String CLid
            {
                get { return sCLid; }
                set
                {
                    sCLid = value;
                    NotifyPropertyChanged("CLid");
                }
            }

            public String sSrc;
            public String Src
            {
                get { return sSrc; }
                set
                {
                    sSrc = value;
                    NotifyPropertyChanged("Src");
                }
            }

            public String sDst;
            public String Dst
            {
                get { return sDst; }
                set
                {
                    sDst = value;
                    NotifyPropertyChanged("Dst");
                }
            }

            public String sDContext;
            public String DContext
            {
                get { return sDContext; }
                set
                {
                    sDContext = value;
                    NotifyPropertyChanged("DContext");
                }
            }

            public String sChannel;
            public String Channel
            {
                get { return sChannel; }
                set
                {
                    sChannel = value;
                    NotifyPropertyChanged("Channel");
                }
            }

            public String sDstChannel;
            public String DstChannel
            {
                get { return sDstChannel; }
                set
                {
                    sDstChannel = value;
                    NotifyPropertyChanged("DstChannel");
                }
            }

            public String sLastapp;
            public String Lastapp
            {
                get { return sLastapp; }
                set
                {
                    sLastapp = value;
                    NotifyPropertyChanged("Lastapp");
                }
            }

            public String sLastdata;
            public String Lastdata
            {
                get { return sLastdata; }
                set
                {
                    sLastdata = value;
                    NotifyPropertyChanged("Lastdata");
                }
            }

            public int sDuration;
            public int Duration
            {
                get { return sDuration; }
                set
                {
                    sDuration = value;
                    NotifyPropertyChanged("Duration");
                }
            }

            public int sBillsec;
            public int Billsec
            {
                get { return sBillsec; }
                set
                {
                    sBillsec = value;
                    NotifyPropertyChanged("Billsec");
                }
            }

            public String sDisposition;
            public String Disposition
            {
                get { return sDisposition; }
                set
                {
                    sDisposition = value;
                    NotifyPropertyChanged("Disposition");
                }
            }

            public int sAmaflags;
            public int Amaflags
            {
                get { return sAmaflags; }
                set
                {
                    sAmaflags = value;
                    NotifyPropertyChanged("Amaflags");
                }
            }

            public String sAccountcode;
            public String Accountcode
            {
                get { return sAccountcode; }
                set
                {
                    sAccountcode = value;
                    NotifyPropertyChanged("Accountcode");
                }
            }

            public String sUniqueId;
            public String UniqueId
            {
                get { return sUniqueId; }
                set
                {
                    sUniqueId = value;
                    NotifyPropertyChanged("UniqueId");
                }
            }

            public String sUserfield;
            public String Userfield
            {
                get { return sUserfield; }
                set
                {
                    sUserfield = value;
                    NotifyPropertyChanged("Userfield");
                }
            }

            public String sDid;
            public String Did
            {
                get { return sDid; }
                set
                {
                    sDid = value;
                    NotifyPropertyChanged("Did");
                }
            }

            public String sRecordingfile;
            public String Recordingfile
            {
                get { return sRecordingfile; }
                set
                {
                    sRecordingfile = value;
                    NotifyPropertyChanged("Recordingfile");
                }
            }

            public String sCNum;
            public String CNum
            {
                get { return sCNum; }
                set
                {
                    sCNum = value;
                    NotifyPropertyChanged("CNum");
                }
            }

            public String sCNam;
            public String CNam
            {
                get { return sCNam; }
                set
                {
                    sCNam = value;
                    NotifyPropertyChanged("CNam");
                }
            }

            public String sOutbound_CNum;
            public String Outbound_CNum
            {
                get { return sOutbound_CNum; }
                set
                {
                    sOutbound_CNum = value;
                    NotifyPropertyChanged("Outbound_CNum");
                }
            }

            public String sOutbound_CNam;
            public String Outbound_CNam
            {
                get { return sOutbound_CNam; }
                set
                {
                    sOutbound_CNam = value;
                    NotifyPropertyChanged("Outbound_CNam");
                }
            }

            public String sDst_CNam;
            public String Dst_CNam
            {
                get { return sDst_CNam; }
                set
                {
                    sDst_CNam = value;
                    NotifyPropertyChanged("Dst_CNam");
                }
            }

            public String sChanname;
            public String Channame
            {
                get { return sChanname; }
                set
                {
                    sChanname = value;
                    NotifyPropertyChanged("Channame");
                }
            }

            public String sCid_num;
            public String Cid_num
            {
                get { return sCid_num; }
                set
                {
                    sCid_num = value;
                    NotifyPropertyChanged("Cid_num");
                }
            }

            public event PropertyChangedEventHandler PropertyChanged;

            public void NotifyPropertyChanged(string propertyName)
            {
                if (PropertyChanged != null)
                {
                    PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
                }
            }
        }

//*************************************************************************************

        public class ParkedCalls : INotifyPropertyChanged
        {
            public String sActionId;
            public String ActionId
            {
                get { return sActionId; }
                set
                {
                    sActionId = value;
                    NotifyPropertyChanged("ActionId");
                }
            }

            public Dictionary<string, string> sAttributes = null;
            public Dictionary<string, string> Attributes
            {
                get { return sAttributes; }
                set
                {
                    sAttributes = value;
                    NotifyPropertyChanged("Attributes");
                }
            }

            public string sCallerId = null;
            public string CallerId
            {
                get { return sCallerId; }
                set
                {
                    sCallerId = value;
                    NotifyPropertyChanged("CallerId");
                }
            }

            public string sCallerIdName = null;
            public string CallerIdName
            {
                get { return sCallerIdName; }
                set
                {
                    sCallerIdName = value;
                    NotifyPropertyChanged("CallerIdName");
                }
            }

            public string sCallerIdNum = null;
            public string CallerIdNum
            {
                get { return sCallerIdNum; }
                set
                {
                    sCallerIdNum = value;
                    NotifyPropertyChanged("CallerIdNum");
                }
            }

            public string sChannel = null;
            public string Channel
            {
                get { return sChannel; }
                set
                {
                    sChannel = value;
                    NotifyPropertyChanged("Channel");
                }
            }

            public DateTime sDateReceived;
            public DateTime DateReceived
            {
                get { return sDateReceived; }
                set
                {
                    sDateReceived = value;
                    NotifyPropertyChanged("DateReceived");
                }
            }

            public string sExten = null;
            public string Exten
            {
                get { return sExten; }
                set
                {
                    sExten = value;
                    NotifyPropertyChanged("Exten");
                }
            }

            public string sFrom = null;
            public string From
            {
                get { return sFrom; }
                set
                {
                    sFrom = value;
                    NotifyPropertyChanged("From");
                }
            }

            public string sInternalActionId= null;
            public string InternalActionId
            {
                get { return sInternalActionId; }
                set
                {
                    sInternalActionId = value;
                    NotifyPropertyChanged("InternalActionId");
                }
            }

            public string sPrivilege = null;
            public string Privilege
            {
                get { return sPrivilege; }
                set
                {
                    sPrivilege = value;
                    NotifyPropertyChanged("Privilege");
                }
            }

            public string sServer = null;
            public string Server
            {
                get { return sServer; }
                set
                {
                    sServer = value;
                    NotifyPropertyChanged("Server");
                }
            }

            public AsterNET.Manager.ManagerConnection sSource;
            public AsterNET.Manager.ManagerConnection Source
            {
                get { return sSource; }
                set
                {
                    sSource = value;
                    NotifyPropertyChanged("Source");
                }
            }

            public long sTimeout;
            public long Timeout
            {
                get { return sTimeout; }
                set
                {
                    sTimeout = value;
                    NotifyPropertyChanged("Timeout");
                }
            }

            public double sTimestamp;
            public double Timestamp
            {
                get { return sTimestamp; }
                set
                {
                    sTimestamp = value;
                    NotifyPropertyChanged("Timestamp");
                }
            }

            public string sUniqueId = null;
            public string UniqueId
            {
                get { return sUniqueId; }
                set
                {
                    sUniqueId = value;
                    NotifyPropertyChanged("UniqueId");
                }
            }

            public event PropertyChangedEventHandler PropertyChanged;

            public void NotifyPropertyChanged(string propertyName)
            {
                if (PropertyChanged != null)
                {
                    PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
                }
            }
        }

//*************************************************************************************

        public class Status : INotifyPropertyChanged
        {
            public string sAccount = null;
            public string Account
            {
                get { return sAccount; }
                set
                {
                    sAccount = value;
                    NotifyPropertyChanged("Account");
                }
            }

            public string sAccountId = null;
            public string AccountId
            {
                get { return sAccountId; }
                set
                {
                    sAccountId = value;
                    NotifyPropertyChanged("AccountId");
                }
            }

            public Dictionary<string, string> sAttributes = null;
            public Dictionary<string, string> Attributes
            {
                get { return sAttributes; }
                set
                {
                    sAttributes = value;
                    NotifyPropertyChanged("Attributes");
                }
            }

            public string sCallerId = null;
            public string CallerId
            {
                get { return sCallerId; }
                set
                {
                    sCallerId = value;
                    NotifyPropertyChanged("CallerId");
                }
            }

            public string sCallerIdName = null;
            public string CallerIdName
            {
                get { return sCallerIdName; }
                set
                {
                    sCallerIdName = value;
                    NotifyPropertyChanged("CallerIdName");
                }
            }

            public string sCallerIdNum = null;
            public string CallerIdNum
            {
                get { return sCallerIdNum; }
                set
                {
                    sCallerIdNum = value;
                    NotifyPropertyChanged("CallerIdNum");
                }
            }

            public string sChannel = null;
            public string Channel
            {
                get { return sChannel; }
                set
                {
                    sChannel = value;
                    NotifyPropertyChanged("Channel");
                }
            }

            public string sBridgedchannel = null;
            public string Bridgedchannel
            {
                get { return sBridgedchannel; }
                set
                {
                    sBridgedchannel = value;
                    NotifyPropertyChanged("Bridgedchannel");
                }
            }

            public string sContext = null;
            public string Context
            {
                get { return sContext; }
                set
                {
                    sContext = value;
                    NotifyPropertyChanged("Context");
                }
            }

            public DateTime sDateReceived;
            public DateTime DateReceived
            {
                get { return sDateReceived; }
                set
                {
                    sDateReceived = value;
                    NotifyPropertyChanged("DateReceived");
                }
            }

            public string sExtension = null;
            public string Extension
            {
                get { return sExtension; }
                set
                {
                    sExtension = value;
                    NotifyPropertyChanged("Extension");
                }
            }

            public string sInternalActionId = null;
            public string InternalActionId
            {
                get { return sInternalActionId; }
                set
                {
                    sInternalActionId = value;
                    NotifyPropertyChanged("Server");
                }
            }

            public string sLink = null;
            public string Link
            {
                get { return sLink; }
                set
                {
                    sLink = value;
                    NotifyPropertyChanged("Link");
                }
            }

            public string sPriority = null;
            public string Priority
            {
                get { return sPriority; }
                set
                {
                    sPriority = value;
                    NotifyPropertyChanged("Priority");
                }
            }

            public string sPrivileg = null;
            public string Privileg
            {
                get { return sPrivileg; }
                set
                {
                    sPrivileg = value;
                    NotifyPropertyChanged("Privileg");
                }
            }

            public string sSeconds = null;
            public string Seconds
            {
                get { return sSeconds; }
                set
                {
                    sSeconds = value;
                    NotifyPropertyChanged("Seconds");
                }
            }

            public string sServer = null;
            public string Server
            {
                get { return sServer; }
                set
                {
                    sServer = value;
                    NotifyPropertyChanged("Server");
                }
            }

            public string sSource = null;
            public string Source
            {
                get { return sSource; }
                set
                {
                    sSource = value;
                    NotifyPropertyChanged("Source");
                }
            }

            public string sState = null;
            public string State
            {
                get { return sState; }
                set
                {
                    sState = value;
                    NotifyPropertyChanged("State");
                }
            }

            public double sTimeStamp;
            public double TimeStamp
            {
                get { return sTimeStamp; }
                set
                {
                    sTimeStamp = value;
                    NotifyPropertyChanged("TimeStamp");
                }
            }

            public string sUniqueId = null;
            public string UniqueId
            {
                get { return sUniqueId; }
                set
                {
                    sUniqueId = value;
                    NotifyPropertyChanged("UniqueId");
                }
            }

            public event PropertyChangedEventHandler PropertyChanged;

            public void NotifyPropertyChanged(string propertyName)
            {
                if (PropertyChanged != null)
                {
                    PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
                }
            }
        }

//*************************************************************************************

        public class Hold : INotifyPropertyChanged
        {
            public string sAccountCode = null;
            public string AccountCode
            {
                get { return sAccountCode; }
                set
                {
                    sAccountCode = value;
                    NotifyPropertyChanged("AccountCode");
                }
            }

            public Dictionary<string, string> sAttributes = null;
            public Dictionary<string, string> Attributes
            {
                get { return sAttributes; }
                set
                {
                    sAttributes = value;
                    NotifyPropertyChanged("Attributes");
                }
            }

            public string sCallerId = null;
            public string CallerId
            {
                get { return sCallerId; }
                set
                {
                    sCallerId = value;
                    NotifyPropertyChanged("CallerId");
                }
            }

            public string sCallerIdName = null;
            public string CallerIdName
            {
                get { return sCallerIdName; }
                set
                {
                    sCallerIdName = value;
                    NotifyPropertyChanged("CallerIdName");
                }
            }

            public string sCaller = null;
            public string Caller
            {
                get { return sCaller; }
                set
                {
                    sCaller = value;
                    NotifyPropertyChanged("Caller");
                }
            }

            public string sCallerIdNum = null;
            public string CallerIdNum
            {
                get { return sCallerIdNum; }
                set
                {
                    sCallerIdNum = value;
                    NotifyPropertyChanged("CallerIdNum");
                }
            }

            public int sCause;
            public int Cause
            {
                get { return sCause; }
                set
                {
                    sCause = value;
                    NotifyPropertyChanged("Cause");
                }
            }

            public string sCauseTxt = null;
            public string CauseTxt
            {
                get { return sCauseTxt; }
                set
                {
                    sCauseTxt = value;
                    NotifyPropertyChanged("CauseTxt");
                }
            }

            public string sChannel = null;
            public string Channel
            {
                get { return sChannel; }
                set
                {
                    sChannel = value;
                    NotifyPropertyChanged("Channel");
                }
            }

            public string sChannelState = null;
            public string ChannelState
            {
                get { return sChannelState; }
                set
                {
                    sChannelState = value;
                    NotifyPropertyChanged("ChannelState");
                }
            }

            public string sChannelStateDesc = null;
            public string ChannelStateDesc
            {
                get { return sChannelStateDesc; }
                set
                {
                    sChannelStateDesc = value;
                    NotifyPropertyChanged("ChannelStateDesc");
                }
            }

            public DateTime sDateReceived;
            public DateTime DateReceived
            {
                get { return sDateReceived; }
                set
                {
                    sDateReceived = value;
                    NotifyPropertyChanged("DateReceived");
                }
            }

            public string sPrivilege = null;
            public string Privilege
            {
                get { return sPrivilege; }
                set
                {
                    sPrivilege = value;
                    NotifyPropertyChanged("Privilege");
                }
            }

            public string sServer = null;
            public string Server
            {
                get { return sServer; }
                set
                {
                    sServer = value;
                    NotifyPropertyChanged("Server");
                }
            }

            public string sStatus = null;
            public string Status
            {
                get { return sStatus; }
                set
                {
                    sStatus = value;
                    NotifyPropertyChanged("Status");
                }
            }

            public AsterNET.Manager.ManagerConnection sSource = null;
            public AsterNET.Manager.ManagerConnection Source
            {
                get { return sSource; }
                set
                {
                    sSource = value;
                    NotifyPropertyChanged("Source");
                }
            }

            public string sQueue = null;
            public string Queue
            {
                get { return sQueue; }
                set
                {
                    sQueue = value;
                    NotifyPropertyChanged("Queue");
                }
            }

            public string sState = null;
            public string State
            {
                get { return sState; }
                set
                {
                    sState = value;
                    NotifyPropertyChanged("State");
                }
            }

            public double sTimeStamp;
            public double TimeStamp
            {
                get { return sTimeStamp; }
                set
                {
                    sTimeStamp = value;
                    NotifyPropertyChanged("TimeStamp");
                }
            }

            public string sUniqueID = null;
            public string UniqueID
            {
                get { return sUniqueID; }
                set
                {
                    sUniqueID = value;
                    NotifyPropertyChanged("UniqueID");
                }
            }

            public event PropertyChangedEventHandler PropertyChanged;

            public void NotifyPropertyChanged(string propertyName)
            {
                if (PropertyChanged != null)
                {
                    PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
                }
            }
        }

//*************************************************************************************

        public class Presence : INotifyPropertyChanged
        {

            public string sPresencestate = null;
            public string Presencestate
            {
                get { return sPresencestate; }
                set
                {
                    sPresencestate = value;
                    NotifyPropertyChanged("Presencestate");
                }
            }

            public event PropertyChangedEventHandler PropertyChanged;

            public void NotifyPropertyChanged(string propertyName)
            {
                if (PropertyChanged != null)
                {
                    PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
                }
            }
        }

        public class UserPresence : INotifyPropertyChanged
        {

            public string sUser = null;
            public string User
            {
                get { return sUser; }
                set
                {
                    sUser = value;
                    NotifyPropertyChanged("User");
                }
            }

            public string sState = null;
            public string State
            {
                get { return sState; }
                set
                {
                    sState = value;
                    NotifyPropertyChanged("State");
                }
            }

            public string sSubject = null;
            public string Subject
            {
                get { return sSubject; }
                set
                {
                    sSubject = value;
                    NotifyPropertyChanged("Subject");
                }
            }

            public string sMessage = null;
            public string Message
            {
                get { return sMessage; }
                set
                {
                    sMessage = value;
                    NotifyPropertyChanged("Message");
                }
            }
            

            public event PropertyChangedEventHandler PropertyChanged;

            public void NotifyPropertyChanged(string propertyName)
            {
                if (PropertyChanged != null)
                {
                    PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
                }
            }
        }

//*************************************************************************************

        public class CustomPhonebook : INotifyPropertyChanged
        {

            public string sId = null;
            public string Id
            {
                get { return sId; }
                set
                {
                    sId = value;
                    NotifyPropertyChanged("Id");
                }
            }

            public string sCustomerName = null;
            public string CustomerName
            {
                get { return sCustomerName; }
                set
                {
                    sCustomerName = value;
                    NotifyPropertyChanged("CustomerName");
                }
            }

            public string sCompany = null;
            public string Company
            {
                get { return sCompany; }
                set
                {
                    sCompany = value;
                    NotifyPropertyChanged("Company");
                }
            }

            public string sPhone1 = null;
            public string Phone1
            {
                get { return sPhone1; }
                set
                {
                    sPhone1 = value;
                    NotifyPropertyChanged("Phone1");
                }
            }

            public string sPhone2 = null;
            public string Phone2
            {
                get { return sPhone2; }
                set
                {
                    sPhone2 = value;
                    NotifyPropertyChanged("Phone2");
                }
            }

            public string sMobile_Phone = null;
            public string Mobile_Phone
            {
                get { return sMobile_Phone; }
                set
                {
                    sMobile_Phone = value;
                    NotifyPropertyChanged("Mobile_Phone");
                }
            }

            public string sModifiedBy = null;
            public string ModifiedBy
            {
                get { return sModifiedBy; }
                set
                {
                    sModifiedBy = value;
                    NotifyPropertyChanged("ModifiedBy");
                }
            }

            public string sModified = null;
            public string Modified
            {
                get { return sModified; }
                set
                {
                    sModified = value;
                    NotifyPropertyChanged("Modified");
                }
            }

            public event PropertyChangedEventHandler PropertyChanged;

            public void NotifyPropertyChanged(string propertyName)
            {
                if (PropertyChanged != null)
                {
                    PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
                }
            }
        }
    }
}

